<h2>Products</h2>

<div *ngFor="let product of products">
  <h3>
    <a
      [title]="product.name "
      [routerLink]="['/products',product.id]">
      {{ product.name }} </a>
    <!--     [routerLink]="['/products',product.id]  这个逗号会拼接成 /-->
    <!--    http://localhost:4200/products/1     -->

  </h3>
  <p *ngIf="product.description">Description: {{ product.description }}</p>
  <button type="button" (click)="share()">Share</button>
  <app-product-alerts
    [product]="product"
    (notify)="onNotify()"
  >
  </app-product-alerts>
</div>
